package com.winit.datasync.service;

import java.util.HashMap;
import java.util.List;

public interface BaseService<T> {
	
	/**
	 * 批量插入
	 * @param list
	 * @param datasouceType
	 * @throws Exception
	 */
	public void batchSave(List<T> list,int datasouceType) throws Exception;
	
	/**
	 * 根据参数获取数据
	 * @param params
	 * @param datasouceType
	 * @return
	 * @throws Exception
	 */
	public List<T> getByParams(HashMap<String, String> params,int datasouceType) throws Exception;

	/**
	 * 获取全部数据
	 * @param datasouceType
	 * @return
	 * @throws Exception
	 */
	public List<T> getAll(int datasouceType) throws Exception;
	/**
	 * mongo两个集合插入处理
	 * @param newList
	 * @param existList
	 * @throws Exception
	 */
	public void batchMongoSave(List<T> newList,List<T> existList) throws Exception;
}
